<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        .a{
            position: relative;
            width: 100px;
            height: 100px;
            background-color: #ddaaaa;
        }
        .b{
            position: absolute;
            top: 50%;
            left: 50%;
            width: 30px;
            height: 40px;
            margin-top: -20px;
            margin-left: -15px;
            background: #000;
        }
    </style>
</head>
<body>
<div class="a">
    <div class="b">

    </div>
</div>
</body>
</html>